package Exams.MeituanPack.test02_flowerNum;

import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            int l = sc.nextInt(), r = sc.nextInt();
            boolean flag = false;
            while(l <= r){
                int count = 0, bin = l;
                while(bin > 0){
                    count += (int)Math.pow((bin % 10),3);
                    bin /= 10;
                }
                if(l == count){
                    flag = true;
                    System.out.print(l + " ");
                }
                l++;
            }
            if(!flag){
                System.out.println("no");
            }

        }
        sc.close();
    }
}
